import { requestClient } from '#/api/request';

// 列表
export const queryPage = (params: any) =>
  requestClient.get('/bus/bbs/page', { params });

// 添加
export const querySave = (params: any) =>
  requestClient.post('/bus/bbs/save', params);

// 更新
export const queryUpdate = (params: any) =>
  requestClient.post('/bus/bbs/update', params);

// 删除
export const queryRemove = (params: any) =>
  requestClient.post('/bus/bbs/remove', params);

// 修改状态
export const setState = (params: any) =>
  requestClient.post('/bus/bbs/setState', params);

// 分类列表
export const queryCatePage = (params: any) =>
  requestClient.get('/bus/bbclass/page', { params });

// 地址搜索
export const queryAddress = (region: string) =>
  requestClient.get(
    `https://apis.map.qq.com/ws/place/v1/search?boundary=nearby(40.040589,116.273543,1000)&keyword=${region}&page_size=10&page_index=1&key=O7CBZ-4BJKZ-Q7CXH-7YY24-NMO42-P4BJ2`,
    {},
  );
